package com.winphone.uvam.entity;

import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.winphone.uvam.common.Constant;

import java.util.Date;


/**
 * <p>
 * 
 * </p>
 *
 * @author lwl
 * @since 2017-12-13
 */
@TableName("sys_user")
public class SysUser extends SuperEntity<SysUser> {

    private static final long serialVersionUID = 1L;

    /**
     * 用户名
     */
	private String username;
    /**
     * 密码
     */
	private String password;
    /**
     * 真实姓名
     */
	private String truename;
    /**
	 * 性别(1、男 2、女)
	 */
	private String sex;
	/**
	 *联系方式
	 */
    private String phone;
	/**
	 * 系统用户状态(1、正常，2锁定)
	 */
	@TableField("user_state")
	private String userState = Constant.SYSUSER_STATE_1;
    /**
     * 角色id
     */
	@TableField("role_id")
	private Long roleId;
    /**
     * 是否删除( 0未删除  1删除)
     */
	@TableField("is_delete")
	private String isDelete;
    /**
     * 创建人
     */
	@TableField("create_by")
	private Long createBy;
    /**
     * 创建时间
     */
	@TableField("create_date")
//	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	private Date createDate;
    /**
     * 修改人
     */
	@TableField("update_by")
	private Long updateBy;
    /**
     * 修改时间
     */
	@TableField("update_date")
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	private Date updateDate;
    /**
     * 教师介绍
     */
	@TableField("teacher_intro")
	private String teacherIntro;
    /**
     * 教师图片
     */
	@TableField("teacher_img")
	private String teacherImg;

    /**
     * 邮箱
     */
    @TableField("email")
    private String email;

    /**
     * 所在省市
     */
    @TableField("location")
    private String location;

    /**
     * 联系地址
     */
    @TableField("address")
    private String address;

    /**
     * 所属机构
     */
    @TableField("organization")
    private String organization;

	/**
	 * 教师编号
	 */
	@TableField("teacher_number")
    private String teacherNumber;

    //==========================扩展属性====================

    @TableField(exist = false)
    private Role role;

	@TableField(exist = false)
    private String roleName;

	/**
	 * 省ID
	 */
	@TableField(exist = false)
	private Long provinceId;
	/**
	 * 省名称
	 */
	@TableField(exist = false)
	private String provinceName;

	public String getUsername() {
		return username;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getTruename() {
		return truename;
	}

	public void setTruename(String truename) {
		this.truename = truename;
	}

	public String getSex() {
		return sex;
	}

	public void setSex(String sex) {
		this.sex = sex;
	}

	public Long getRoleId() {
		return roleId;
	}

	public void setRoleId(Long roleId) {
		this.roleId = roleId;
	}

	public String getIsDelete() {
		return isDelete;
	}

	public void setIsDelete(String isDelete) {
		this.isDelete = isDelete;
	}

	public Long getCreateBy() {
		return createBy;
	}

	public void setCreateBy(Long createBy) {
		this.createBy = createBy;
	}

	public Date getCreateDate() {
		return createDate;
	}

	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}

	public Long getUpdateBy() {
		return updateBy;
	}

	public void setUpdateBy(Long updateBy) {
		this.updateBy = updateBy;
	}

	public Date getUpdateDate() {
		return updateDate;
	}

	public void setUpdateDate(Date updateDate) {
		this.updateDate = updateDate;
	}

	public String getTeacherIntro() {
		return teacherIntro;
	}

	public void setTeacherIntro(String teacherIntro) {
		this.teacherIntro = teacherIntro;
	}

	public String getTeacherImg() {
		return teacherImg;
	}

	public void setTeacherImg(String teacherImg) {
		this.teacherImg = teacherImg;
	}

	public Role getRole() {
		return role;
	}

	public void setRole(Role role) {
		this.role = role;
	}

	public String getRoleName() {
		return roleName;
	}

	public void setRoleName(String roleName) {
		this.roleName = roleName;
	}

	public String getPhone() {
		return phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}

	public String getUserState() {
		return userState;
	}

    public void setUserState(String userState) {
        this.userState = userState;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getLocation() {
        return location;
    }

    public void setLocation(String location) {
        this.location = location;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

	public String getOrganization() {
		return organization;
	}

	public void setOrganization(String organization) {
		this.organization = organization;
	}

	public Long getProvinceId() {
		return provinceId;
	}

	public void setProvinceId(Long provinceId) {
		this.provinceId = provinceId;
	}

	public String getProvinceName() {
		return provinceName;
	}

	public void setProvinceName(String provinceName) {
		this.provinceName = provinceName;
	}

	public String getTeacherNumber() {
		return teacherNumber;
	}

	public void setTeacherNumber(String teacherNumber) {
		this.teacherNumber = teacherNumber;
	}
}
